package com.yixun.qfbao.model.enums;

/**
 * 决策适用范围：0:全部机构,1:机构，2:门店,3:组别,4:经纪人
 */
public enum DecisionApplyEnum {
    ALL(0, "全部机构"),
    ORGANIZATION(1, "机构"),
    STORE(2, "门店"),
    GROUP(3, "组别"),
    AGENT(4, "经纪人");

    public static String getDescByNo(Integer no) {
        for (DecisionApplyEnum decisionApplyEnum : DecisionApplyEnum.values()) {
            if(decisionApplyEnum.getNo().equals(no)) {
                return decisionApplyEnum.getDesc();
            }
        }
        return null;
    }

    DecisionApplyEnum(Integer no, String desc) {
        this.no = no;
        this.desc = desc;
    }

    private Integer no;
    private String desc;

    public Integer getNo() {
        return no;
    }

    public String getDesc() {
        return desc;
    }
}
